package org.example;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.security.NoSuchAlgorithmException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class Main {
    public static void main(String[] args) throws IOException {
        Map<String, Object> fileData = new HashMap<>();
        File tempFile = Files.createTempFile("testFile", ".txt").toFile();
        tempFile.deleteOnExit();
        fileData.put("name", tempFile.getName());
        fileData.put("size", tempFile.length());
        fileData.put("full_path", tempFile.getAbsolutePath());
        fileData.put("file_id", "66");
        fileData.put("fir_app_id", "66");

        try {
            Upload123Pan.upload(fileData);
        } catch (IOException e) {
            throw new RuntimeException(e);
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException(e);
        }
    }
}